package egovframework.nanum.portal.cnfg.common.configuration;

import java.util.HashMap;
import java.util.Map;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

public abstract class ConfigurationRegistry<T> {
	
	protected Log logger = LogFactory.getLog(this.getClass());
	
	private Map<T, String> registry;
	
	public ConfigurationRegistry() {
		this.initialize();
	}
	
	private void initialize() {
		this.registry = new HashMap<T, String>();
	}
	
	protected void add(T key, String value) {
		this.registry.put(key, value);
	}
	
	protected void clear() {
		this.registry.clear();
	}

	public String get(T key) {
		return this.registry.get(key);
	}
	
	protected Map<T, String> getRegistry() {
		return this.registry;
	}
}
